<template>
    <div class="desc-container">
        <h2>{{info.title}}</h2>
        <hr>
        <p class="content" v-html="info.content">

        </p>
    </div>
</template>

<script>
export default {
    data() {
        return {
            id:this.$route.params.id,
            info:{}
        }
    },
    created() {
        this.getgoodsDesc()
    },
    methods:{
        getgoodsDesc(){
            this.$http.get('api/goods/getdesc/' + this.id).then(result=>{
                if(result.body.status == 0){
                    this.info = result.body.message[0]
                }
            })
        }
    }
}
</script>

<style lang="scss">
    .desc-container{
        h2{
            font-size:16px;
            color:blue;
            margin:20px auto;
            text-align:center;
        }
        img{
            width:100%;
        }
    }
</style>